package com.common.lib.network

import com.common.lib.bean.*
import io.reactivex.rxjava3.core.Observable
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST


interface Api {

    //获取验证码
    @FormUrlEncoded
    @POST("app.php/login/sendCode?")
    fun sendCode(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<Any>>

    //手机快捷登录
    @FormUrlEncoded
    @POST("app.php/login/telLogin?")
    fun telLogin(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<UserBean>>

    //微信扫码登录
    @FormUrlEncoded
    @POST("app.php/login/userlogin?")
    fun wxLogin(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<UserBean>>

    //微信授权
    @FormUrlEncoded
    @POST("app.php/login/userlogin?")
    fun wechatLogin(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<UserBean>>

    @FormUrlEncoded
    @POST("app.php/user/getuserinfo?")
    fun getUserInfo(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<UserBean>>


    @FormUrlEncoded
    @POST("app.php/user/edituser?")
    fun editUser(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<Any>>

    @FormUrlEncoded
    @POST("app.php/video/videolist?")
    fun videoList(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<ArrayList<VideoBean>>>

    @FormUrlEncoded
    @POST("app.php/video/newvideoinfo?")
    fun videoDetail(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<VideoBean>>
    @FormUrlEncoded
    @POST("app.php/video/videoinfo?")
    fun videoInfo(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<VideoBean>>

    @FormUrlEncoded
    @POST("app.php/user/getrecordlog?")
    fun getSportRecord(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<ArrayList<SportRecordBean>>>

    @FormUrlEncoded
    @POST("app.php/user/getsportinfo?")
    fun getSportInfo(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<SportInfoBean>>

    @FormUrlEncoded
    @POST("app.php/video/browseadd?")
    fun addVideoRecord(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<Any>>

    @FormUrlEncoded
    @POST("app.php/login/getversion?")
    fun checkVer(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<VersionBean>>


    @FormUrlEncoded
    @POST("app.php/video/getBrowseList?")
    fun getVideoRecord(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<ArrayList<VideoBean>>>

    @FormUrlEncoded
    @POST("app.php/video/randomuser?")
    fun randomUser(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<Any?>>

    @FormUrlEncoded
    @POST("app.php/motion/runuploadinfo?")
    fun runUploadSportInfo(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<Any?>>


    @FormUrlEncoded
    @POST("app.php/motion/uploadinfo?")
    fun uploadinfo(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<Any?>>

    @GET("app.php/cctv/getcctv")
    fun getTVData(): Observable<BasicResponse<ArrayList<VideoBean>>>

    @FormUrlEncoded
    @POST("app.php/setting/getAdvert?")
    fun getAdvert(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<ArrayList<BannerBean>>>

    @FormUrlEncoded
    @POST("app.php/setting/getApkList?")
    fun getApkList(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<ArrayList<ApplicationBean>>>

    @FormUrlEncoded
    @POST("app.php/Setting/brandInfo?")
    fun brandInfo(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<BrandInfoBean>>


    @FormUrlEncoded
    @POST("app.php/video/getVideoList?")
    fun getVideoList(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<ProceduralTrainBean>>

    @FormUrlEncoded
    @POST("app.php/video/Wattinfo?")
    fun getWattinfo(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<VideoInfoBean>>

    @FormUrlEncoded
    @POST("app.php/motion/recorddetail?")
    fun recordDetail(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<RecordDetailBean>>

    @FormUrlEncoded
    @POST("app.php/video/getVtag?")
    fun getVideoTag(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<ArrayList<VideoTagBean>>>

    @FormUrlEncoded
    @POST("app.php/video/addcollect?")
    fun addcollect(@FieldMap names: HashMap<String, Any>): Observable<BasicResponse<Any?>>




}